package events;

/**
 * Rain is a class that inheirts from the event class. This allows for further
 * definition of the unique objects that occur only when it rains.
 * 
 * @author Team Switchboard Boxcar (Dan Grissom)
 * 
 */
public class Rain extends Event {

	private double AccidentProb; // Need to update type

	/**
	 * The Rain Constructor builds the Rain event. Rain events will always occur
	 * at simulation Time = -1. This will allow for the rain to be processed
	 * before any other events are processed. The effects of the rain will last
	 * for the remainder of the simulation.
	 * 
	 * @param MyAccidentProb
	 *            Probability that an accident will occur on any given road
	 *            (between 0 and 1).
	 */
	public Rain(double MyAccidentProb) {
		super(4, -1);
		AccidentProb = MyAccidentProb;
	}

	/**
	 * GetProb returns the probability of an accident if rain occurs in the
	 * simulation. This is the probability that an accident will occur not a
	 * factor increase to the probability an accident will occur.
	 * 
	 * @return Returns the percent chance that an accident will occur during the
	 *         simulation.
	 */
	public double GetProb() 
	{	return AccidentProb;	}

}